package org.example.backend.demos.web.volunteerModule.controller;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ApplyResult {
    // 志愿者ID
    private Long applicationId;
    // 整数状态码
    private Integer status;
    // 中文状态码
    private String statusText;

    public ApplyResult(Long applicationId, Integer status) {
        this.applicationId = applicationId;
        this.status = status;
        this.statusText = getStatusText(status);
    }

    private String getStatusText(Integer status) {
        switch (status) {
            case 0: return "待审核";
            case 1: return "已通过";
            case 2: return "已拒绝";
            default: return "未知状态";
        }
    }
}